<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  // 给数组的原型对象上添加去重方法 ，并将去重的数组返回  [1,3,6,3,6]
  const arr = [1,3,6,3,6]
  Array.prototype.sum=function(){
    return Array.from(new Set(arr))
  }
  console.log(arr.sum());
</script>
</html>